home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d16 / oriel.arc / DEMO.ORL < prev    next >
Text File  |  1991-07-31  |  5KB  |  169 lines

  1. {-----------------------------DEMO.ORL-------------------------------
  2.  This is the main Oriel demo script. It serves as a front-end shell
  3.  for launching the other demo programs. It creates a menu, puts up a
  4.  series of "buttons" that the user can click on, and accepts keyboard
  5.  and mouse input.
  6.  -------------------------------------------------------------------}
  7. {Initialize variable}
  8.     Set Mouse_message = 0
  9.  
  10. {Maximize the window and set the caption}
  11.     SetWindow(MAXIMIZE)
  12.     UseCaption("Oriel for Windows Product Demo")
  13.  
  14. {Set up the menu}
  15.     SetMenu("&Options",IGNORE,
  16.           "&Introduction",Do_Intro,
  17.           "&Features",Do_Features,
  18.           "&Hypertext",Do_Hyper,
  19.           "&Color Palette",Do_Color,
  20.           "Oriel &Draw",Do_Draw,
  21.           "&Applications",Do_WinApps,
  22.           ENDPOPUP,
  23.         "&Exit",Shut_Down,
  24.           ENDPOPUP)
  25.  
  26. {Draw the background}
  27.     UseBackground(TRANSPARENT,0,255,255)    {Light blue background}
  28.     DrawBackground
  29.  
  30. {Put large text and icon at top of screen}
  31.     UseFont("Roman",0,23,BOLD,NOITALIC,NOUNDERLINE,64,0,0)
  32.     DrawText(84,5,"Oriel")
  33.     UseFont("Roman",0,23,BOLD,NOITALIC,NOUNDERLINE,255,0,0)
  34.     DrawText(83,5,"Oriel")
  35.     UseFont("System",0,0,NOBOLD,NOITALIC,NOUNDERLINE,0,0,0)
  36.     DrawText(65,27,"The Graphics-Based Batch Language")
  37.     DrawText(100,32,"for")
  38.     DrawText(80,37,"Microsoft Windows 3.0")
  39.  
  40. {Draw text boxes}
  41.     UseBrush(SOLID,255,255,255)    {White brush}
  42.     Set x1=72
  43.     Set x2=145
  44.     DrawRoundRectangle(x1,48,x2,60,2,2)
  45.     DrawRoundRectangle(x1,63,x2,75,2,2)
  46.     DrawRoundRectangle(x1,78,x2,90,2,2)
  47.     DrawRoundRectangle(x1,93,x2,105,2,2)
  48.     DrawRoundRectangle(x1,108,x2,120,2,2)
  49.     DrawRoundRectangle(x1,123,x2,135,2,2)
  50.  
  51. {Put the text in each box and a bitmap to left of each box}
  52.     UseFont("System",0,0,NOBOLD,ITALIC,NOUNDERLINE,0,0,0)
  53.     Set x=83
  54.     Set Bit_x=57
  55.     DrawBitmap(Bit_x,48,"ORIELICO.BMP")
  56.     DrawText(x,51,"Oriel Introduction")
  57.     DrawBitmap(Bit_x,63,"ORIELICO.BMP")
  58.     DrawText(x,66,"Oriel Features")
  59.     DrawBitmap(Bit_x,78,"ORIELICO.BMP")
  60.     DrawText(x,81,"Hypertext-like Example")
  61.     DrawBitmap(Bit_x,93,"ORIELICO.BMP")
  62.     DrawText(x,96,"Color Palette")
  63.     DrawBitmap(Bit_x,108,"ORIELICO.BMP")
  64.     DrawText(x,111,"Oriel Draw")
  65.     DrawBitmap(Bit_x,123,"ORIELICO.BMP")
  66.     DrawText(x,126,"Windows Applications")
  67.  
  68. {Put directions box to the left of buttons}
  69.     UseBrush(SOLID,255,255,128)    {Cream-colored brush}
  70.     DrawRectangle(10,70,48,98)
  71.     UseFont("System",0,0,NOBOLD,NOITALIC,NOUNDERLINE,0,0,0)
  72.     DrawText(13,74,"Click on an")
  73.     DrawText(13,79,"item to the")
  74.     DrawText(13,84,"right or select")
  75.     DrawText(13,89,"a menu option")
  76.  
  77. {Set up mouse input}
  78.     SetMouse(72,48,145,60,Do_Intro,Temp,Temp,    {Intro button}
  79.          57,48,68,59,Do_Intro,Temp,Temp,    {Intro icon}
  80.          72,63,145,75,Do_Features,Temp,Temp,    {Features button}
  81.          57,63,68,74,Do_Features,Temp,Temp,    {Features icon}
  82.          72,78,145,90,Do_Hyper,Temp,Temp,    {Hypertext button}
  83.          57,78,68,89,Do_Hyper,Temp,Temp,    {Hypertext icon}
  84.          72,93,145,105,Do_Color,Temp,Temp,    {Color pal button}
  85.          57,93,68,104,Do_Color,Temp,Temp,    {Color pal icon}
  86.          72,108,145,120,Do_Draw,Temp,Temp,    {Oriel Draw button}
  87.          57,108,68,119,Do_Draw,Temp,Temp,    {Oriel Draw icon}
  88.          72,123,145,135,Do_WinApps,Temp,Temp,    {Win Apps button}
  89.          57,123,68,134,Do_WinApps,Temp,Temp,    {Win Apps icon}
  90.          0,0,1000,1000,No_hit,Temp,Temp)        {No hit anywhere}
  91.  
  92. {Wait for input}
  93. Wait_for_Input:
  94.     If Mouse_message = 1 Then Goto Erase_mouse
  95.     SetWaitMode(NULL)
  96.     WaitInput()
  97.  
  98. {Put up a message when the user misses with the mouse}
  99. No_hit:
  100.     Set Mouse_message = 1
  101.     UseBrush(SOLID,255,255,128)    {Cream-colored brush}
  102.     DrawRectangle(165,80,187,97)
  103.     UseFont("System",0,0,NOBOLD,NOITALIC,NOUNDERLINE,0,0,0)
  104.     DrawText(167,83,"Click on")
  105.     DrawText(167,89,"an item")
  106.     DrawLine(145,53,165,88)        {Draw 1st line}
  107.     DrawLine(145,68,165,88)        {Draw 2nd line}
  108.     DrawLine(145,83,165,88)        {Draw 3rd line}
  109.     DrawLine(145,98,165,88)        {Draw 4th line}
  110.     DrawLine(145,113,165,88)    {Draw 5th line}
  111.     DrawLine(145,128,165,88)    {Draw 6th line}
  112.     WaitInput(1000)            {Pause 1 sec, then erase}
  113.  
  114. {Erase the message}
  115. Erase_mouse:
  116.     UseBrush(SOLID,0,255,255)
  117.     UsePen(SOLID,1,0,255,255)    {Use light blue pen}
  118.     DrawLine(145,53,165,88)        {Erase 1st line}
  119.     DrawLine(145,68,165,88)        {Erase 2nd line}
  120.     DrawLine(145,83,165,88)        {Erase 3rd line}
  121.     DrawLine(145,98,165,88)        {Erase 4th line}
  122.     DrawLine(145,113,165,88)    {Erase 5th line}
  123.     DrawLine(145,128,165,88)    {Erase 6th line}
  124.     DrawRectangle(165,80,187,97)
  125.     Set Mouse_message = 0
  126.     UsePen(SOLID,1,0,0,0)        {Reset pen to default}
  127.     Goto Wait_for_Input
  128.     
  129. Do_Intro:
  130.     SetWaitMode(FOCUS)
  131.     Run("ORIEL INTRO.ORL")
  132.     WaitInput(1)
  133.     Goto Wait_for_Input
  134.  
  135. Do_Features:
  136.     SetWaitMode(FOCUS)
  137.     Run("ORIEL FEATURES.ORL")
  138.     WaitInput(1)
  139.     Goto Wait_for_Input
  140.  
  141. Do_Hyper:
  142.     SetWaitMode(FOCUS)
  143.     Run("ORIEL HYPER.ORL")
  144.     WaitInput(1)
  145.     Goto Wait_for_Input
  146.  
  147. Do_Color:
  148.     SetWaitMode(FOCUS)
  149.     Run("ORIEL COLOR.ORL")
  150.     WaitInput(1)
  151.     Goto Wait_for_Input
  152.  
  153. Do_Draw:
  154.     SetWaitMode(FOCUS)
  155.     Run("ORIEL DRAW.ORL")
  156.     WaitInput(1)
  157.         Goto Wait_for_Input
  158.  
  159. Do_WinApps:
  160.     SetWaitMode(FOCUS)
  161.     Run("ORIEL WINAPPS.ORL")
  162.     WaitInput(1)
  163.     Goto Wait_for_Input
  164.  
  165. Shut_Down:
  166.     MessageBox(YESNO,1,QUESTION,"Quit the program?",
  167.                "End Oriel Demo",Choice)
  168.     If Choice=2 then Goto Wait_for_Input
  169.     End